{extend name="public:layout" /}
{block name="title"}集采列表{/block}
{block name="head"}
<style>
    i{cursor:pointer}
</style>
{/block}
{block name="body"}
<div class="wrapper wrapper-content">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li><a href="{:url('index')}"><i class="fa fa-hand-o-right"></i> 集采商品</a></li>
                <li> 集采列表</li>
            </ol>
        </div>
        <div class="ibox-content">
            <table class="table table-bordered">
                <thead>
                <tr>
                    <th>订单号</th>
                    <th>集采人</th>
                    <th>集采数量</th>
                    <th>集采时间</th>
                    <th>是否缴纳保证金</th>
                    <th>保证金缴纳时间</th>
                    <th>是否转化为订单</th>
                </tr>
                </thead>
                <tbody>
                {volist name="list" id="vo"}
                <tr>
                    <td>{$vo.order_sn}</td>
                    <td>{$vo.username}</td>
                    <td>{$vo.num}</td>
                    <td>{$vo.create_time|date="y-m-d H:i:s",###}</td>
                    <td>{$vo.margin_status_text}</td>
                    <td>{$vo.margin_time_text}</td>
                    <td>{$vo.is_order_text}</td>
                </tr>
                {/volist}
                </tbody>
            </table>
            <div class="page-bar">{$list->render()}</div>
            <div class="clearfix"></div>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    //更新排序
    function updateOrder() {
        if ($(".list_order").length > 0) {
            var data = $(".list_order").serialize();
            var url = "{:url('updateOrder')}";
            getAjax(url, data, function (data) {
                layer.msg(data.msg, {icon: 1, time: 800}, function () {
                    rePage();
                });
            });
        }
    }
    //切换状态
    function setStatus(goodsId,field,status){
        var url="{:url('setStatus')}";
        var params = {goods_id:goodsId,field:field,status:status};
        getAjax(url, params, function (res) {
            rePage();
        });
    }
</script>
{/block}